from sqlalchemy import Table, Date, Column, Integer, String, ForeignKey
from sqlalchemy.orm import registry
from sqlalchemy import Table, MetaData, Column, Integer, String, ForeignKey
from sqlalchemy.orm import registry
mapper_registry = registry()
Base = mapper_registry.generate_base()



class Students(Base):
    __tablename__ = "students"
    st_id = Column(String(32), primary_key=True)
    st_name = Column(String(20))
    u_id = Column(String(32))
    st_address = Column(String(64))
    st_birthday = Column(Date)
    st_status = Column(Integer)


    def __init__(self,st_id=None,st_name=None,u_id=None,st_address=None,st_birthday=None,st_status=None):
        self.st_id = st_id
        self.st_name = st_name
        self.u_id = u_id
        self.st_address = st_address
        self.st_birthday = st_birthday
        self.st_status = st_status

    def format_str(self):
        return self.st_id+","+self.st_name+","+self.u_id+","+self.st_address+","+self.st_birthday+","+self.st_status








